|
speaker2 2.2.1
|
This file contains API for Speaker 2 Click Driver. More...
#include "drv_digital_out.h"#include "drv_digital_in.h"#include "drv_spi_master.h"#include "spi_specifics.h"Go to the source code of this file.
Data Structures | |
| struct | speaker2_device_id_t |
| Speaker 2 Click device ID object. More... | |
| struct | speaker2_t |
| Speaker 2 Click context object. More... | |
| struct | speaker2_cfg_t |
| Speaker 2 Click configuration object. More... | |
Enumerations | |
| enum | speaker2_return_value_t { SPEAKER2_OK = 0 , SPEAKER2_ERROR = -1 } |
| Speaker 2 Click return value data. More... | |
Functions | |
| void | speaker2_cfg_setup (speaker2_cfg_t *cfg) |
| Speaker 2 configuration object setup function. | |
| err_t | speaker2_init (speaker2_t *ctx, speaker2_cfg_t *cfg) |
| Speaker 2 initialization function. | |
| err_t | speaker2_default_cfg (speaker2_t *ctx) |
| Speaker 2 default configuration function. | |
| err_t | speaker2_send_command (speaker2_t *ctx, uint8_t cmd, uint8_t *payload, uint16_t payload_len) |
| Speaker 2 send command function. | |
| void | speaker2_set_io5_pin (speaker2_t *ctx, uint8_t state) |
| Speaker 2 set IO5 pin function. | |
| uint8_t | speaker2_get_rdy_pin (speaker2_t *ctx) |
| Speaker 2 get RDY pin function. | |
| uint8_t | speaker2_get_int_pin (speaker2_t *ctx) |
| Speaker 2 get INT pin function. | |
| err_t | speaker2_wait_ready (speaker2_t *ctx) |
| Speaker 2 wait ready function. | |
| err_t | speaker2_wait_status (speaker2_t *ctx, uint8_t mask, uint8_t state) |
| Speaker 2 wait status function. | |
| err_t | speaker2_wait_idle (speaker2_t *ctx) |
| Speaker 2 wait idle function. | |
| err_t | speaker2_check_communication (speaker2_t *ctx) |
| Speaker 2 check communication function. | |
| err_t | speaker2_read_status (speaker2_t *ctx, uint8_t *int_status) |
| Speaker 2 read status function. | |
| err_t | speaker2_clear_interrupt (speaker2_t *ctx, uint8_t *int_status) |
| Speaker 2 clear interrupt function. | |
| err_t | speaker2_read_device_id (speaker2_t *ctx, speaker2_device_id_t *device_id) |
| Speaker 2 read device ID function. | |
| err_t | speaker2_power_up (speaker2_t *ctx) |
| Speaker 2 power up function. | |
| err_t | speaker2_power_down (speaker2_t *ctx) |
| Speaker 2 power down function. | |
| err_t | speaker2_reset_device (speaker2_t *ctx) |
| Speaker 2 reset device function. | |
| err_t | speaker2_memory_erase (speaker2_t *ctx, uint32_t address) |
| Speaker 2 memory erase function. | |
| err_t | speaker2_chip_erase (speaker2_t *ctx) |
| Speaker 2 chip erase function. | |
| err_t | speaker2_flash_write (speaker2_t *ctx, uint32_t address, uint8_t *data_in, uint16_t data_len) |
| Speaker 2 flash write function. | |
| err_t | speaker2_flash_read (speaker2_t *ctx, uint32_t address, uint8_t *data_out, uint16_t data_len) |
| Speaker 2 flash read function. | |
| err_t | speaker2_write_binary (speaker2_t *ctx, uint32_t address, const uint8_t *data_in, uint16_t data_len) |
| Speaker 2 write binary function. | |
| err_t | speaker2_write_cfg_reg (speaker2_t *ctx, uint8_t reg, uint8_t data_in) |
| Speaker 2 write configuration register function. | |
| err_t | speaker2_read_cfg_reg (speaker2_t *ctx, uint8_t reg, uint8_t *data_out) |
| Speaker 2 read configuration register function. | |
| err_t | speaker2_set_clock_cfg (speaker2_t *ctx, uint8_t clk_cfg) |
| Speaker 2 set clock configuration function. | |
| err_t | speaker2_read_clock_cfg (speaker2_t *ctx, uint8_t *clk_cfg) |
| Speaker 2 read clock configuration function. | |
| err_t | speaker2_spi_audio_write (speaker2_t *ctx, uint8_t *data_in, uint16_t data_len) |
| Speaker 2 SPI audio write function. | |
| err_t | speaker2_pcm_audio_read (speaker2_t *ctx, uint16_t *data_out, uint16_t data_len) |
| Speaker 2 PCM audio read function. | |
| err_t | speaker2_play_voice (speaker2_t *ctx, uint16_t index) |
| Speaker 2 play voice function. | |
| err_t | speaker2_play_voice_loop (speaker2_t *ctx, uint16_t index, uint16_t loop_cnt) |
| Speaker 2 play voice loop function. | |
| err_t | speaker2_play_macro (speaker2_t *ctx, uint16_t index) |
| Speaker 2 play macro function. | |
| err_t | speaker2_play_silence (speaker2_t *ctx, uint8_t len) |
| Speaker 2 play silence function. | |
| err_t | speaker2_stop_play (speaker2_t *ctx) |
| Speaker 2 stop play function. | |
| err_t | speaker2_stop_loop_play (speaker2_t *ctx) |
| Speaker 2 stop loop play function. | |
This file contains API for Speaker 2 Click Driver.